<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>过度小案例</title>
    <style>
        .picture {
            width: 300px;
            height: 300px;
            margin: 100px  auto;
            position: relative;
            overflow: hidden;
        }
        .mask {
            width: 300px;
            height: 300px;
            background-color: black;
            color: white;
            font-size: 100px;
            line-height: 300px;
            text-align: center;
            position: absolute;
            left: 0;
            top: 0;
            opacity: 0;
            transition: 1s linear  all;
            cursor: pointer;
        }
        img {
            transition: 1s linear  all;
        }
        .picture:hover  img {
            opacity: 0.5;
            transform: scale(1.2) rotate(20deg);
            
        }
        .mask:hover {
            opacity: 0.5;
        }
    </style>
</head>
<body>
    <div class="picture">
        <img src="./喜羊羊.jpg" alt="喜羊羊">
        <div class="mask">喜羊羊</div>

    </div>
</body>
</html>